package com.iot.system.service.impl;

import java.util.List;

import com.iot.system.domain.ProductionLineDeviceRelation;
import com.iot.system.mapper.ProductionLineDeviceRelationMapper;
import com.iot.system.service.IProductionLineDeviceRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 产线设备关系Service业务层处理
 * 
 * @author iot
 * @date 2025-02-12
 */
@Service
public class ProductionLineDeviceRelationServiceImpl implements IProductionLineDeviceRelationService
{
    @Autowired
    private ProductionLineDeviceRelationMapper productionLineDeviceRelationMapper;

    /**
     * 查询产线设备关系
     * 
     * @param id 产线设备关系主键
     * @return 产线设备关系
     */
    @Override
    public ProductionLineDeviceRelation selectProductionLineDeviceRelationById(Long id)
    {
        return productionLineDeviceRelationMapper.selectProductionLineDeviceRelationById(id);
    }

    /**
     * 查询产线设备关系列表
     * 
     * @param productionLineDeviceRelation 产线设备关系
     * @return 产线设备关系
     */
    @Override
    public List<ProductionLineDeviceRelation> selectProductionLineDeviceRelationList(ProductionLineDeviceRelation productionLineDeviceRelation)
    {
        return productionLineDeviceRelationMapper.selectProductionLineDeviceRelationList(productionLineDeviceRelation);
    }

    /**
     * 新增产线设备关系
     * 
     * @param productionLineDeviceRelation 产线设备关系
     * @return 结果
     */
    @Override
    public int insertProductionLineDeviceRelation(ProductionLineDeviceRelation productionLineDeviceRelation)
    {
        return productionLineDeviceRelationMapper.insertProductionLineDeviceRelation(productionLineDeviceRelation);
    }

    /**
     * 修改产线设备关系
     * 
     * @param productionLineDeviceRelation 产线设备关系
     * @return 结果
     */
    @Override
    public int updateProductionLineDeviceRelation(ProductionLineDeviceRelation productionLineDeviceRelation)
    {
        return productionLineDeviceRelationMapper.updateProductionLineDeviceRelation(productionLineDeviceRelation);
    }

    /**
     * 批量删除产线设备关系
     * 
     * @param ids 需要删除的产线设备关系主键
     * @return 结果
     */
    @Override
    public int deleteProductionLineDeviceRelationByIds(Long[] ids)
    {
        return productionLineDeviceRelationMapper.deleteProductionLineDeviceRelationByIds(ids);
    }

    /**
     * 删除产线设备关系信息
     * 
     * @param id 产线设备关系主键
     * @return 结果
     */
    @Override
    public int deleteProductionLineDeviceRelationById(Long id)
    {
        return productionLineDeviceRelationMapper.deleteProductionLineDeviceRelationById(id);
    }
}
